import fetch from '@/utils/fetch'

const BrandApi = {
  getPageList (params) {
    return fetch({
      url: '/api/brand/page',
      method: 'get',
      params: params
    })
  },
  getUnbindList (params) {
    return fetch({
      url: '/api/brand/unBinding',
      method: 'get',
      params: params
    })
  },
  getBindList (params) {
    return fetch({
      url: '/api/brand/binding',
      method: 'get',
      params: params
    })
  },
  add (params) {
    return fetch({
      url: '/api/brand/add',
      method: 'post',
      data: params
    })
  },
  update (params) {
    return fetch({
      url: '/api/brand/' + params.id,
      method: 'put',
      data: params
    })
  },
  del (params) {
    return fetch({
      url: '/api/brand/' + params,
      method: 'delete'
    })
  },
  bind (params) {
    return fetch({
      url: '/api/category/addBrand',
      method: 'post',
      data: params
    })
  }
}
export default BrandApi
